from google.appengine.ext import db

class RecMap(db.Model):
    name = db.StringProperty()
    url = db.LinkProperty()
    submitted_by = db.UserProperty()
    add_date = db.DateTimeProperty(
        verbose_name='date added',
        auto_now_add = True,
    )
    mod_date = db.DateTimeProperty(
        verbose_name='date last modified',
        auto_now = True,
    )

class PosRef(db.Model):
    map = db.ReferenceProperty(RecMap)
    loc_ref = db.GeoPtProperty()
    geo_ref = db.GeoPtProperty()
    scale = db.IntegerProperty()
    rotation = db.FloatProperty()
    positioned_by = db.UserProperty()
    add_date = db.DateTimeProperty(
        verbose_name='date added',
        auto_now_add = True,
    )
    mod_date = db.DateTimeProperty(
        verbose_name='date modified',
        auto_now = True,
    )

